package test.transferFile2;

import java.io.IOException;
import java.net.InetSocketAddress;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;

/**
 * 
 * @author tianl
 * @email tianl@sxis.com
 * @date 2013-4-16
 */
public class Server {

  public static void main(String[] args) throws IOException {
    NioSocketAcceptor acceptor=new NioSocketAcceptor();
    // acceptor.getFilterChain().addLast("threadPool", new ExecutorFilter());
    // acceptor.getFilterChain().addLast("fileRegionWriteFilter",
    // new FileRegionWriteFilter());
    acceptor.setHandler(new ServerHandler());
    // acceptor.getFilterChain().addLast("MyFilter", new MyFilter());
    acceptor.bind(new InetSocketAddress(8089));
    System.out.println("Listening on port " + 8089);
  }
}
